package com.dfbz.demo01_卖票案例;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo06_使用Lambda表达式创建线程 {
    public static void main(String[] args) {

       /* Runnable runnable= ()->{
            for (int i = 0; i < 10000; i++) {
                System.out.println(Thread.currentThread().getName());
            }
        };*/


        Thread thread = new Thread(()->{
            for (int i = 0; i < 10000; i++) {
                System.out.println(Thread.currentThread().getName());
            }
        });
        thread.start();

        for (int i = 0; i < 10000; i++) {
            System.out.println(Thread.currentThread().getName());
        }


    }
}
